import os
from tkinter import *

def setup():
	os.system("echo One-Station Hacker Tools Installation")
	os.system("echo Author Jack Hou Smith")
	os.system("echo Including:")
	os.system("echo Nmap/Zenmap")
	os.system("echo Hydra/xHydra")
	os.system("echo John the Ripper")
	os.system("echo Nikto")
	os.system("echo Aircrack-ng")
	os.system("echo Crunch")
	os.system("echo Telnet")
	os.system("echo Wireshark")
	os.system("echo Skipfish")
	os.system("echo Sqlmap")
	os.system("echo Commix")
	os.system("echo p0f")
	os.system("echo Bbqsql")
	os.system("echo Metasploit")
	os.system("echo Social Engineer Toolkit(SET)")

	keyboard_input = input("Do you want to start install?[Y/n]:")

	if keyboard_input.lower() == "y":
		os.system("sudo apt-get install python-pip")
		#Install pip

		os.system("sudo apt-get install nmap zenmap hydra hydra-gtk john nikto aircrack-ng crunch telnet wireshark skipfish sqlmap commix p0f --fix-missing")
		os.system("sudo apt-get install git curl postgresql --fix-missing")
		#Install basic tools, including Nmap/Zenmap, Hydra/xHydra, John the Ripper, Nikto, Aircrack-ng, Crunch, Telnet, Wireshark, Skipfish, Sqlmap, Commix and p0f
		#Install git and curl for Metasploit and Social Engineer Toolkit

		os.system("sudo pip install bbqsql")
		#Install Bbqsql by using pip

		os.system("sudo curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall")
		os.system("sudo chmod 755 msfinstall")
		os.system("sudo ./msfinstall")
		#Install Metasploit by using curl

		os.system("sudo git clone https://github.com/trustedsec/social-engineer-toolkit/ setoolkit/")
		os.system("cd setoolkit")
		os.system("sudo pip3 install -r requirements.txt")
		os.system("sudo python setup.py")
		#Install Social Engineer Toolkit by using git

		os.system("cd ~")
		#Back to the main folder to install Commix next

		os.system("sudo git clone https://github.com/commixproject/commix.git commix")
		os.system("cd commix")
		os.system("sudo python commix.py -h")
		#Install Commix by using git
	else:
		pass

def installUnlisted():
	print(input_line.get())
	keyboard_input=input_line.get()
	os.system("sudo apt-get install " + keyboard_input)

top=Tk()
top.title("TENET")
top.geometry("300x100")

label1=Label(top, text="Click 'Setup' to Install Toolkit")
label1.pack(side=TOP)

setup=Button(top, text="Setup", command=setup)
setup.pack(side=TOP)

label2=Label(top, text="Enter the Tool's Package Name and Click 'Install'")

input_line=Entry(top, width=25)
input_line.pack(side=TOP)

submit=Button(top, text="Install", command=installUnlisted)
submit.pack(side=TOP)

top.mainloop()
